package com.group.common.utils;

import com.group.common.users.NEPGUser;
import com.group.common.users.NEPMUser;
import com.group.common.users.NEPSUser;
import com.group.common.users.Sex;

import java.util.ArrayList;

/**
 * 批量生成用户数据
 *
 * @author 刘海翔
 * @version 1.0
 */
public class UserGenerator {
/**
 * 生成NEPS用户数据
 *
 * @param count 生成数量
 * @return 生成的用户数据
 */
    public static ArrayList<NEPSUser> generateNEPSUsers(int count) {
        ArrayList<NEPSUser> users = new ArrayList<>();
        for (int i = 0; i < count; i++) {
            String username = "NEPSUser" + i;
            String password = "pass" + i;
            String phoneNumber = String.valueOf(i);
            String remark = "remark" + i;
            NEPSUser user = new NEPSUser(username, password, phoneNumber, remark, Sex.MALE);
            users.add(user);
        }
        return users;
    }
    /**
     * 批量生成NEPG用户数据
     *
     * @param count 生成数量
     * @return 生成的用户数据
     */
    public static ArrayList<NEPGUser> generateNEPGUsers(int count) {
        ArrayList<NEPGUser> users = new ArrayList<>();
        for (int i = 0; i < count; i++) {
            String username = "NEPGUser" + i;
            String password = "pass" + i;
            NEPGUser user = new NEPGUser(username, password);
            users.add(user);
        }
        return users;
    }
    /**
     * 批量生成NEPM用户数据
     *
     * @param count 生成数量
     * @return 生成的用户数据
     */
    public static ArrayList<NEPMUser> generateNEPMUsers(int count) {
        ArrayList<NEPMUser> users = new ArrayList<>();
        for (int i = 0; i < count; i++) {
            String username = "NEPMUser" + i;
            String password = "pass" + i;
            NEPMUser user = new NEPMUser(username, password);
            users.add(user);
        }
        return users;
    }

}
